package com.hello.system.mapper;

import java.util.List;
import com.hello.system.domain.RentalOrders;
import com.hello.system.domain.dto.RentalOrdersWithDetailsDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

/**
 * 租赁订单Mapper接口
 * 
 * @author hello
 * @date 2025-07-20
 */
@Mapper
public interface RentalOrdersMapper extends BaseMapper<RentalOrders>
{
    /**
     * 查询租赁订单
     * 
     * @param orderId 租赁订单主键
     * @return 租赁订单
     */
    public RentalOrders selectRentalOrdersByOrderId(Long orderId);

    /**
     * 查询租赁订单列表
     * 
     * @param rentalOrders 租赁订单
     * @return 租赁订单集合
     */
    public List<RentalOrders> selectRentalOrdersList(RentalOrders rentalOrders);

    /**
     * 新增租赁订单
     * 
     * @param rentalOrders 租赁订单
     * @return 结果
     */
    public int insertRentalOrders(RentalOrders rentalOrders);

    /**
     * 修改租赁订单
     * 
     * @param rentalOrders 租赁订单
     * @return 结果
     */
    public int updateRentalOrders(RentalOrders rentalOrders);

    /**
     * 删除租赁订单
     * 
     * @param orderId 租赁订单主键
     * @return 结果
     */
    public int deleteRentalOrdersByOrderId(Long orderId);

    /**
     * 批量删除租赁订单
     * 
     * @param orderIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRentalOrdersByOrderIds(Long[] orderIds);

    /**
     * 查询当前用户的租赁订单列表（包含设备名称和地址详细信息）
     * 
     * @param rentalOrders 租赁订单查询条件
     * @return 租赁订单详情集合
     */
    public List<RentalOrdersWithDetailsDto> selectMyRentalOrdersWithDetails(RentalOrders rentalOrders);
}
